
#include	"SysConfig.h"
#include	"Define.h"
#include	"Port.h"
#include	"NXP_I2C.h"
#include	"Tuner.h"

#ifdef  ATOMIC
#include	"Atomic_DRV.h"
#define	ATOMIC_CLOCK_9216000Hz	// 9216000
//#define	ATOMIC_CLOCK_4MHz

#ifdef  NXP
extern unsigned char ucNXP_I2CData[64];
extern void NXP_I2C_Send(unsigned char *ucBuf, unsigned char ucCnt);
extern void NXP_I2C_Read(unsigned char *ucBuf, unsigned char ucCnt);
extern void NXP_I2C_SendRead(unsigned char *ucBuf, unsigned char ucWCnt, unsigned char ucRCnt);
extern unsigned char NXP_I2C_WriteByte(unsigned char ucData);
extern void NXP_I2C_Start(void);
extern void NXP_I2C_Stop(void);
#endif
extern void FUNC_AbnormalRecovery(void);

void ATOMIC_SetVolumeAM(void);
void ATOMIC_SetVolumeFM(void);
unsigned short usATOMIC_DataCnt;
unsigned char ucATOMIC_BootSeq_Timer10msec;
unsigned char ucATOMIC_Band;
unsigned char ucATOMIC_BootSeq;
unsigned char ucATOMIC_Band;

signed short sATOMIC_SignalLevel;
unsigned short usATOMIC_QRS;
unsigned short usATOMIC_USN;
unsigned short usATOMIC_WAM;
signed short sATOMIC_FOF;

signed short sATOMIC_FM_SeekStopLevel;
signed short sATOMIC_AM_SeekStopLevel;

unsigned char const ucATOMIC_InitTable[] =
{
	// INFO  Load I2C settings from: C:\Program Files\NXP\TEF665x_1.5.13\i2c.dat
	// INFO  Start Initialising a ROM device...
	// INFO  Reset ROM Device...(Device is now in Boot state)
//	0x05, 0x1E, 0x5A, 0x01, 0x5A, 0x5A, 
	0x03, 0x1C, 0x00, 0x00, 
	0x03, 0x1C, 0x00, 0x74, 
	// INFO  Load Required Internal Initialization(s)....
0x19, 0x1B, 0xF0, 0x00, 0x38, 0x2B, 0xD0, 0x80, 0xF0, 0x00, 0x38, 0x32, 0xD0, 0x80, 0x43, 0xB2, 0x38, 0x35, 0xD0, 0x80, 0xF0, 0x00, 0x70, 0x00, 0xC2, 0xF7, 
0x19, 0x1B, 0xF0, 0x00, 0x38, 0x66, 0xD0, 0x80, 0x80, 0xFC, 0x39, 0x09, 0xD0, 0x80, 0xF0, 0x00, 0x39, 0x0E, 0xD0, 0x80, 0xF0, 0x00, 0x39, 0x11, 0xD0, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x39, 0x71, 0xD0, 0x80, 0xF0, 0x00, 0x39, 0x28, 0xD0, 0x80, 0xC4, 0xA2, 0x02, 0x0F, 0x60, 0x04, 0x90, 0x01, 0x39, 0x2A, 0xD0, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x38, 0xEB, 0xD0, 0x80, 0xF0, 0x00, 0x39, 0x31, 0xD2, 0x80, 0xF0, 0x00, 0x39, 0x35, 0xD0, 0x80, 0x40, 0x20, 0x39, 0x41, 0xD0, 0x80, 
0x19, 0x1B, 0x9E, 0x30, 0x18, 0xF9, 0xD2, 0x80, 0xF0, 0x00, 0x39, 0x43, 0xD0, 0x80, 0xF0, 0x00, 0x39, 0x46, 0xD0, 0x80, 0xF0, 0x00, 0x39, 0x49, 0xD0, 0x80, 
0x19, 0x1B, 0x32, 0x00, 0x39, 0x4B, 0xD0, 0x80, 0x9F, 0x9E, 0x39, 0x4D, 0xD0, 0x80, 0xA8, 0x01, 0x39, 0x5F, 0xD0, 0x80, 0xF0, 0x00, 0x39, 0x73, 0xD0, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x39, 0x75, 0xD0, 0x80, 0xF0, 0x00, 0x39, 0x77, 0xD0, 0x80, 0xF0, 0x00, 0x39, 0x8A, 0xD0, 0x80, 0xF0, 0x00, 0x39, 0x8D, 0xD0, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x39, 0x90, 0xD0, 0x80, 0xF0, 0x00, 0x39, 0x93, 0xD0, 0x80, 0xF0, 0x00, 0x70, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x39, 0x98, 0xD0, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x39, 0x6A, 0xD2, 0x80, 0xF0, 0x00, 0x39, 0xA6, 0xD0, 0x80, 0x00, 0x43, 0x39, 0xA9, 0xD9, 0x80, 0xF0, 0x00, 0x39, 0xAC, 0xD0, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x39, 0xC6, 0xD0, 0x80, 0xF0, 0x00, 0x39, 0xC9, 0xD0, 0x80, 0xF0, 0x00, 0x39, 0xDA, 0xD0, 0x80, 0xF0, 0x00, 0x39, 0xE8, 0xD0, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x0E, 0x3F, 0x60, 0x00, 0x50, 0x10, 0x28, 0xD8, 0xD2, 0x80, 0x91, 0x01, 0x01, 0x36, 0x60, 0x00, 0xF0, 0x00, 0x70, 0x00, 0xA0, 0x17, 
0x19, 0x1B, 0xF0, 0x00, 0x70, 0x00, 0xA0, 0xD7, 0xF0, 0x00, 0x70, 0x00, 0xA0, 0xE7, 0xF0, 0x00, 0x70, 0x00, 0xA1, 0x28, 0xF0, 0x00, 0x70, 0x00, 0xA1, 0x4D, 
0x19, 0x1B, 0xF0, 0x00, 0x70, 0x00, 0xA1, 0x7E, 0xF0, 0x00, 0x20, 0x31, 0xD0, 0x80, 0xF0, 0x00, 0x04, 0xC1, 0x60, 0x08, 0xF0, 0x00, 0x01, 0x01, 0xD2, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x00, 0x30, 0xD0, 0x80, 0x00, 0x7F, 0x60, 0x02, 0xE2, 0x00, 0xF0, 0x00, 0x0E, 0x22, 0x60, 0x0A, 0xF0, 0x00, 0x00, 0xFF, 0x60, 0x03, 
0x19, 0x1B, 0xF0, 0x00, 0x01, 0x42, 0xD2, 0x80, 0x90, 0x03, 0x40, 0x02, 0xF0, 0x00, 0x90, 0x43, 0x01, 0x70, 0xD1, 0x80, 0xF0, 0x00, 0x01, 0x69, 0xD0, 0x80, 
0x19, 0x1B, 0x0E, 0x69, 0x60, 0x0A, 0xA1, 0xAE, 0x20, 0x23, 0x00, 0x01, 0x60, 0x01, 0xF0, 0x00, 0x70, 0x00, 0xF0, 0x00, 0xC4, 0xCB, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0xCA, 0x09, 0x30, 0x23, 0xF0, 0x00, 0xC2, 0xCB, 0x70, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x30, 0x23, 0xD0, 0x08, 0x82, 0x00, 0x0D, 0x50, 0x60, 0x08, 
0x19, 0x1B, 0xF0, 0x00, 0x0D, 0x51, 0x60, 0x09, 0x30, 0x00, 0x21, 0x80, 0x60, 0x01, 0xF0, 0x00, 0x40, 0x32, 0xF0, 0x00, 0x30, 0x11, 0x45, 0xF3, 0xF0, 0x00, 
0x19, 0x1B, 0x30, 0x92, 0x2D, 0x30, 0x60, 0x04, 0x31, 0x13, 0x2D, 0x40, 0x60, 0x05, 0x31, 0x94, 0x7F, 0xFF, 0x60, 0x06, 0x32, 0x15, 0x0D, 0x61, 0x60, 0x0A, 
0x19, 0x1B, 0x32, 0x96, 0x0D, 0x6B, 0x60, 0x0B, 0x33, 0x10, 0x0D, 0x50, 0x60, 0x01, 0x33, 0x90, 0x0D, 0x5C, 0x60, 0x02, 0x30, 0x21, 0x0D, 0x63, 0x60, 0x03, 
0x19, 0x1B, 0x30, 0x31, 0x0D, 0x75, 0x60, 0x0C, 0x30, 0xA2, 0x8D, 0x00, 0x60, 0x01, 0x30, 0xB3, 0x01, 0x73, 0x60, 0x02, 0x30, 0x41, 0x00, 0x25, 0x60, 0x03, 
0x19, 0x1B, 0x30, 0xC2, 0x40, 0x44, 0xF0, 0x00, 0x31, 0x43, 0x40, 0x35, 0xF0, 0x00, 0x31, 0xC4, 0x64, 0x00, 0x60, 0x06, 0x32, 0x45, 0x1F, 0x40, 0x60, 0x07, 
0x19, 0x1B, 0x32, 0xC6, 0x70, 0x00, 0xF0, 0x00, 0x33, 0x47, 0x1E, 0xBC, 0x60, 0x0D, 0x33, 0xC0, 0x01, 0x22, 0x60, 0x01, 0x34, 0x40, 0xFD, 0xEE, 0x60, 0x02, 
0x19, 0x1B, 0x30, 0x51, 0x7B, 0x8F, 0x60, 0x03, 0x30, 0xD2, 0xC4, 0x29, 0x60, 0x04, 0x31, 0x51, 0x1E, 0xC2, 0x60, 0x0E, 0x32, 0x53, 0xFF, 0x0D, 0x60, 0x02, 
0x19, 0x1B, 0x32, 0xD4, 0x7D, 0x2E, 0x60, 0x03, 0x30, 0x61, 0xC1, 0x9A, 0x60, 0x04, 0x30, 0xE2, 0x70, 0x00, 0xF0, 0x00, 0x31, 0x61, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0x32, 0x63, 0x70, 0x00, 0xF0, 0x00, 0x32, 0xE4, 0x70, 0x00, 0xD0, 0x08, 0xF0, 0x00, 0x03, 0x70, 0xD2, 0x80, 0xF0, 0x00, 0x70, 0x00, 0xA0, 0x02, 
0x19, 0x1B, 0xF0, 0x00, 0x70, 0x00, 0xA0, 0x59, 0xF0, 0x00, 0x02, 0x15, 0xD0, 0x80, 0xF0, 0x00, 0x0D, 0x51, 0x60, 0x0F, 0xF0, 0x00, 0x05, 0x17, 0x60, 0x0E, 
0x19, 0x1B, 0x23, 0xF6, 0x70, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x21, 0x63, 0x41, 0xF5, 0x91, 0x8F, 0x21, 0xF8, 0x40, 0x74, 0xC3, 0xEF, 0x21, 0xE0, 0xF0, 0x00, 
0x19, 0x1B, 0xC3, 0xA4, 0x33, 0xF7, 0xF0, 0x00, 0xD8, 0x5B, 0x70, 0x00, 0xF0, 0x00, 0x82, 0x18, 0x70, 0x00, 0xF0, 0x00, 0x9F, 0xAF, 0x18, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0x9F, 0x0F, 0x31, 0xF8, 0x90, 0x02, 0xF0, 0x00, 0x70, 0x00, 0x90, 0x28, 0xF0, 0x00, 0x70, 0x00, 0xD0, 0x08, 0xF0, 0x00, 0x22, 0x78, 0xF0, 0x00, 
0x19, 0x1B, 0x16, 0xD3, 0x60, 0x09, 0xA0, 0x7F, 0x35, 0xF0, 0x1E, 0xBC, 0x60, 0x0D, 0xF0, 0x00, 0x0D, 0x61, 0x60, 0x08, 0xF0, 0x00, 0x03, 0xA5, 0xD2, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x1E, 0xC2, 0x60, 0x0D, 0xF0, 0x00, 0x0D, 0x6B, 0x60, 0x08, 0xF0, 0x00, 0x03, 0xA5, 0xD2, 0x80, 0xF0, 0x00, 0x21, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0x83, 0x6D, 0x22, 0xF1, 0xF0, 0x00, 0xF0, 0x00, 0x23, 0x77, 0xF0, 0x00, 0x90, 0x41, 0x36, 0x70, 0xF0, 0x00, 0x9E, 0x79, 0x70, 0x00, 0x90, 0x01, 
0x19, 0x1B, 0xF0, 0x00, 0x32, 0xF1, 0xD0, 0x08, 0x91, 0xC7, 0x33, 0x75, 0xF0, 0x00, 0xF0, 0x00, 0x34, 0x70, 0xE6, 0x00, 0xF0, 0x00, 0x34, 0xF0, 0xE6, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x24, 0x74, 0xF0, 0x00, 0xF0, 0x00, 0x24, 0xF3, 0xF0, 0x00, 0x8C, 0x24, 0x26, 0xF2, 0x40, 0x16, 0x8A, 0x1B, 0x34, 0x74, 0x4F, 0xF5, 
0x19, 0x1B, 0x82, 0xB7, 0x34, 0xF3, 0xF0, 0x00, 0xF0, 0x00, 0x20, 0x71, 0x90, 0x05, 0x83, 0x04, 0x70, 0x00, 0xF0, 0x00, 0x8E, 0x67, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x70, 0x00, 0x90, 0x02, 0xF0, 0x00, 0x36, 0xF6, 0xF0, 0x00, 0xF0, 0x00, 0x34, 0xF0, 0x80, 0x06, 0x82, 0xAF, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0x82, 0x1B, 0x70, 0x00, 0xD0, 0x09, 0x8E, 0x5F, 0x70, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x70, 0x00, 0xD0, 0x09, 0xF0, 0x00, 0x36, 0xF5, 0xF0, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x34, 0x70, 0xF0, 0x00, 0x40, 0x11, 0x27, 0x72, 0xA1, 0x51, 0x90, 0x8A, 0x20, 0xF3, 0xA1, 0x50, 0x8E, 0xD7, 0x37, 0x72, 0xF0, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x37, 0xF1, 0xE6, 0x00, 0xF0, 0x00, 0x70, 0x00, 0xD0, 0x08, 0xF0, 0x00, 0x22, 0x7A, 0xF0, 0x00, 0x16, 0xC3, 0x60, 0x09, 0xA0, 0x58, 
0x19, 0x1B, 0xF0, 0x00, 0x18, 0x20, 0xF0, 0x00, 0xF0, 0x00, 0x35, 0x70, 0xF0, 0x00, 0xF0, 0x00, 0x32, 0x7A, 0xD0, 0x08, 0x82, 0x00, 0x0D, 0x51, 0x60, 0x08, 
0x19, 0x1B, 0x40, 0x03, 0x70, 0x00, 0xF0, 0x00, 0x33, 0x80, 0x70, 0x00, 0xF0, 0x00, 0x21, 0x06, 0x70, 0x00, 0xF0, 0x00, 0x37, 0x00, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0x37, 0x80, 0x40, 0x15, 0xF0, 0x00, 0x36, 0x83, 0x70, 0x00, 0xF0, 0x00, 0x33, 0x05, 0x0D, 0x61, 0x60, 0x09, 0x32, 0x86, 0x0D, 0x6B, 0x60, 0x0A, 
0x19, 0x1B, 0x32, 0x10, 0x70, 0x00, 0xF0, 0x00, 0x32, 0x90, 0x70, 0x00, 0xF0, 0x00, 0x33, 0x10, 0x70, 0x00, 0xF0, 0x00, 0x33, 0x90, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0x34, 0x10, 0x70, 0x00, 0xF0, 0x00, 0x34, 0x90, 0x70, 0x00, 0xF0, 0x00, 0x31, 0x10, 0x70, 0x00, 0xF0, 0x00, 0x31, 0x90, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0x32, 0x20, 0x70, 0x00, 0xF0, 0x00, 0x32, 0xA0, 0x70, 0x00, 0xF0, 0x00, 0x33, 0x20, 0x70, 0x00, 0xF0, 0x00, 0x33, 0xA0, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0x34, 0x20, 0x70, 0x00, 0xF0, 0x00, 0x34, 0xA0, 0x70, 0x00, 0xF0, 0x00, 0x31, 0x20, 0x70, 0x00, 0xF0, 0x00, 0x31, 0xA0, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0x82, 0x00, 0x0D, 0x30, 0x60, 0x0A, 0x0D, 0x40, 0x60, 0x0B, 0xC0, 0x10, 0xF0, 0x00, 0x10, 0x20, 0xF0, 0x00, 0x0D, 0x51, 0x60, 0x0C, 0xC0, 0x10, 
0x19, 0x1B, 0xF0, 0x00, 0x10, 0x30, 0xF0, 0x00, 0xF0, 0x00, 0x35, 0xC0, 0xD0, 0x08, 0xF0, 0x00, 0x0D, 0x75, 0x60, 0x0F, 0xF0, 0x00, 0x05, 0x63, 0x60, 0x0E, 
0x19, 0x1B, 0x24, 0xF7, 0x05, 0x1D, 0x60, 0x0D, 0x25, 0x76, 0x70, 0x00, 0xF0, 0x00, 0x91, 0xC7, 0x20, 0xE8, 0x40, 0x15, 0x91, 0x8F, 0x21, 0xE9, 0xD4, 0x09, 
0x19, 0x1B, 0xC3, 0xEF, 0x20, 0x00, 0x40, 0x12, 0x9F, 0xBE, 0x20, 0x11, 0x58, 0x03, 0xA0, 0x80, 0x35, 0x77, 0x90, 0x01, 0xF0, 0x00, 0x70, 0x00, 0xD0, 0x08, 
0x19, 0x1B, 0xF0, 0x00, 0x21, 0xF5, 0xF0, 0x00, 0xA0, 0xCA, 0x22, 0x54, 0xF0, 0x00, 0xCC, 0x09, 0x05, 0x17, 0x60, 0x0C, 0x83, 0x2C, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0x8A, 0x61, 0x70, 0x00, 0xF0, 0x00, 0xAE, 0x48, 0x22, 0x45, 0xA1, 0x19, 0xA2, 0x28, 0x20, 0x78, 0xF0, 0x00, 0xF0, 0x00, 0x35, 0xF0, 0xF0, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x18, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x30, 0x78, 0xF0, 0x00, 0x16, 0xE3, 0x60, 0x09, 0xA0, 0x27, 0x89, 0x01, 0x23, 0xF4, 0xF0, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x20, 0xF2, 0xF0, 0x00, 0x82, 0x61, 0x21, 0x73, 0xF0, 0x00, 0xA0, 0x50, 0x36, 0x70, 0xF0, 0x00, 0xA0, 0x58, 0x23, 0x72, 0xE1, 0x40, 
0x19, 0x1B, 0xA8, 0x01, 0x22, 0xF3, 0xF0, 0x00, 0x90, 0x49, 0x22, 0x75, 0xE0, 0x40, 0x80, 0x61, 0x70, 0x00, 0xF0, 0x00, 0x8A, 0x51, 0x33, 0xF1, 0xF0, 0x00, 
0x19, 0x1B, 0xA0, 0x58, 0x70, 0x00, 0xF0, 0x00, 0xAF, 0x48, 0x70, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x34, 0x70, 0xD0, 0x08, 0x82, 0x00, 0x0D, 0x75, 0x60, 0x08, 
0x19, 0x1B, 0x90, 0x09, 0x0D, 0x00, 0x60, 0x09, 0xF0, 0x00, 0x35, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x33, 0x80, 0xC0, 0x28, 0xF0, 0x00, 0x10, 0x10, 0xF0, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x34, 0x81, 0xD0, 0x08, 0x82, 0x49, 0x0D, 0x75, 0x60, 0x08, 0xF0, 0x00, 0x70, 0x00, 0x8F, 0xFD, 0x04, 0x00, 0x60, 0x00, 0xA0, 0xFF, 
0x19, 0x1B, 0x8E, 0xC0, 0x40, 0x00, 0x60, 0x05, 0x60, 0x00, 0x60, 0x05, 0xE6, 0x00, 0xC8, 0x1B, 0x70, 0x00, 0xF0, 0x00, 0xD8, 0xDB, 0x0D, 0x51, 0x60, 0x08, 
0x19, 0x1B, 0x83, 0x5B, 0x70, 0x00, 0xF0, 0x00, 0x9E, 0xBA, 0x30, 0x03, 0xF0, 0x00, 0xF0, 0x00, 0x30, 0x84, 0xD4, 0x09, 0xF0, 0x00, 0x70, 0x00, 0x8F, 0xAF, 
0x19, 0x1B, 0xF0, 0x00, 0x0D, 0x75, 0x60, 0x08, 0xF0, 0x00, 0x0D, 0x51, 0x60, 0x09, 0xF0, 0x00, 0x24, 0x03, 0xF0, 0x00, 0xF0, 0x00, 0x27, 0x94, 0xD0, 0x08, 
0x19, 0x1B, 0xA0, 0x03, 0x70, 0x00, 0xF0, 0x00, 0x00, 0x11, 0x08, 0x00, 0xF0, 0x00, 0x00, 0x11, 0x08, 0x00, 0xC0, 0x0E, 0xA0, 0x09, 0x00, 0x11, 0x08, 0x00, 
0x19, 0x1B, 0xA0, 0x09, 0x70, 0x00, 0xF0, 0x00, 0xA4, 0x08, 0x70, 0x00, 0xD0, 0x08, 0xA0, 0x03, 0x70, 0x00, 0xF0, 0x00, 0x00, 0x11, 0x08, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0x00, 0x11, 0x08, 0x00, 0xC0, 0x26, 0xA0, 0x09, 0x00, 0x11, 0x08, 0x00, 0xA0, 0x09, 0x70, 0x00, 0xF0, 0x00, 0xA4, 0x08, 0x70, 0x00, 0xD0, 0x08, 
0x19, 0x1B, 0xF0, 0x00, 0x1D, 0x01, 0x60, 0x08, 0xF0, 0x00, 0x0A, 0x2C, 0x60, 0x00, 0xF0, 0x00, 0x01, 0x1A, 0x60, 0x01, 0x31, 0x00, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0x31, 0x81, 0x70, 0x00, 0xD0, 0x08, 0xA8, 0x01, 0x7F, 0xFF, 0x60, 0x06, 0xCC, 0x0A, 0x70, 0x00, 0xF0, 0x00, 0x8E, 0xA1, 0x31, 0x06, 0xF0, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x32, 0x06, 0xD4, 0x09, 0xAE, 0xE8, 0x04, 0xDF, 0xD0, 0x80, 0x10, 0x00, 0x60, 0x03, 0xA0, 0xDC, 0x30, 0x23, 0x07, 0x73, 0xD2, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x07, 0xC6, 0xD0, 0x80, 0x08, 0x00, 0x60, 0x03, 0xA0, 0x02, 0x0E, 0x6F, 0x60, 0x09, 0xF0, 0x00, 0x02, 0x00, 0x60, 0x03, 0x80, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x07, 0x73, 0xD0, 0x80, 0x40, 0xE0, 0x00, 0x1F, 0x60, 0x01, 0x13, 0xD5, 0x60, 0x07, 0xA0, 0x06, 0x13, 0xFB, 0x60, 0x06, 0xF0, 0x00, 
0x19, 0x1B, 0x90, 0x40, 0x0D, 0x28, 0xD2, 0x80, 0x14, 0x05, 0x60, 0x06, 0xF0, 0x00, 0xF0, 0x00, 0x0D, 0x28, 0xD2, 0x80, 0x14, 0x0F, 0x60, 0x06, 0xF0, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x0D, 0x28, 0xD0, 0x80, 0xD7, 0xCA, 0x00, 0xFF, 0x60, 0x04, 0x81, 0xD7, 0x0C, 0xF7, 0x60, 0x09, 0xD0, 0x56, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0x82, 0x76, 0x30, 0x17, 0xF0, 0x00, 0xD0, 0xF6, 0x40, 0x83, 0xF0, 0x00, 0xC1, 0xA4, 0x20, 0x19, 0xF0, 0x00, 0x82, 0xF6, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0xC1, 0x80, 0x20, 0x17, 0xA0, 0xC6, 0xC3, 0xE7, 0x70, 0x00, 0xF0, 0x00, 0xC5, 0xC7, 0x70, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x30, 0x17, 0xD0, 0x08, 
0x19, 0x1B, 0xF0, 0x00, 0x70, 0x00, 0xA0, 0x79, 0xF0, 0x00, 0x70, 0x00, 0x80, 0x43, 0x1E, 0xC8, 0x60, 0x08, 0xA0, 0xC0, 0xF0, 0x00, 0x20, 0x00, 0xA0, 0xBF, 
0x19, 0x1B, 0x90, 0x00, 0x70, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x70, 0x00, 0xD4, 0x09, 0xF0, 0x00, 0x70, 0x00, 0x8F, 0xC5, 0x1E, 0xC8, 0x60, 0x08, 0xA0, 0xBB, 
0x19, 0x1B, 0xF0, 0x00, 0x30, 0x00, 0xD0, 0x08, 0x00, 0x28, 0x60, 0x00, 0xA0, 0xB9, 0x9E, 0x38, 0x0E, 0xF4, 0x60, 0x09, 0x9E, 0x38, 0x70, 0x00, 0x9F, 0xFF, 
0x19, 0x1B, 0xF0, 0x00, 0x70, 0x00, 0xD0, 0x08, 0x40, 0x40, 0x0C, 0x8A, 0xD5, 0x80, 0xF0, 0x00, 0x0C, 0x8B, 0xD2, 0x80, 0xF0, 0x00, 0x0F, 0xB1, 0xD2, 0x80, 
0x19, 0x1B, 0x9C, 0x39, 0x70, 0x00, 0xF0, 0x00, 0x9C, 0x31, 0x70, 0x00, 0x90, 0x04, 0xF0, 0x00, 0x70, 0x00, 0x90, 0x03, 0x40, 0x10, 0x70, 0x00, 0xAF, 0xF3, 
0x19, 0x1B, 0x41, 0xF1, 0x40, 0x40, 0xF0, 0x00, 0xF0, 0x00, 0x10, 0xB1, 0xD0, 0x80, 0x40, 0x00, 0x70, 0x00, 0xAF, 0xF0, 0x41, 0xF1, 0x40, 0x40, 0xF0, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x10, 0xB2, 0xD0, 0x80, 0x40, 0x71, 0x10, 0xB2, 0xD2, 0x80, 0xF0, 0x00, 0x10, 0x81, 0xD0, 0x80, 0xF0, 0x00, 0x0B, 0xC9, 0x60, 0x08, 
0x19, 0x1B, 0xF0, 0x00, 0x1D, 0x8D, 0xD2, 0x80, 0xF0, 0x00, 0x16, 0xD5, 0xD0, 0x80, 0xF0, 0x00, 0x0B, 0xC9, 0x60, 0x08, 0xF0, 0x00, 0x1D, 0x8F, 0xD2, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x16, 0xDA, 0xD0, 0x80, 0x3E, 0x91, 0x1F, 0x5F, 0xD2, 0x80, 0xF0, 0x00, 0x23, 0x8A, 0xD0, 0x80, 0x0D, 0x82, 0x60, 0x08, 0xA0, 0x9F, 
0x19, 0x1B, 0xF0, 0x00, 0x30, 0x00, 0xD0, 0x08, 0x0F, 0x88, 0x60, 0x0B, 0x94, 0x07, 0x90, 0x46, 0x0D, 0x82, 0x60, 0x0A, 0x2E, 0xB2, 0x1B, 0x93, 0xD2, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x20, 0x25, 0xF0, 0x00, 0xDA, 0xC9, 0x70, 0x00, 0xF0, 0x00, 0x8C, 0x69, 0x70, 0x00, 0xF0, 0x00, 0xDD, 0x49, 0x32, 0x01, 0xF0, 0x00, 
0x19, 0x1B, 0x8D, 0x89, 0x70, 0x00, 0x80, 0x01, 0x8C, 0x69, 0x70, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x1B, 0x7F, 0xD0, 0x80, 0xF0, 0x00, 0x0B, 0x60, 0x60, 0x0E, 
0x19, 0x1B, 0xF0, 0x00, 0x00, 0x04, 0x60, 0x03, 0x40, 0xA7, 0x3F, 0xFC, 0x60, 0x04, 0x32, 0x63, 0x80, 0x08, 0x60, 0x05, 0x32, 0xE4, 0x19, 0x9A, 0x60, 0x06, 
0x19, 0x1B, 0x33, 0x65, 0x0D, 0x83, 0x60, 0x0F, 0x31, 0xE6, 0x70, 0x00, 0xF0, 0x00, 0x30, 0x77, 0x70, 0x00, 0xD0, 0x08, 0x80, 0xE5, 0x7F, 0xFF, 0x60, 0x00, 
0x19, 0x1B, 0xCC, 0x0A, 0x70, 0x00, 0xF0, 0x00, 0x8E, 0xA9, 0x33, 0x70, 0xF0, 0x00, 0xAF, 0x20, 0x34, 0x70, 0xD4, 0x09, 0xAE, 0xE8, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0xA8, 0x05, 0x00, 0x80, 0x60, 0x07, 0xA8, 0xF6, 0x33, 0x75, 0xF0, 0x00, 0xC3, 0x86, 0x70, 0x00, 0xF0, 0x00, 0x8F, 0x7F, 0x33, 0xF6, 0xF0, 0x00, 
0x19, 0x1B, 0xA8, 0x85, 0x1D, 0xE4, 0xD1, 0x80, 0xF0, 0x00, 0x34, 0x75, 0xD0, 0x08, 0x0D, 0x83, 0x60, 0x09, 0xA0, 0x80, 0x20, 0x12, 0x1F, 0x32, 0xD2, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x35, 0x82, 0xD0, 0x08, 0x90, 0x82, 0x0D, 0x83, 0x60, 0x09, 0x40, 0xA7, 0x40, 0x77, 0xE6, 0x40, 0xF0, 0x00, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x30, 0x17, 0xD0, 0x08, 0x0B, 0xB4, 0x60, 0x08, 0xA0, 0x79, 0xF0, 0x00, 0x31, 0x82, 0xD0, 0x08, 0x00, 0xCF, 0x60, 0x00, 0xA0, 0x05, 
0x19, 0x1B, 0x40, 0x11, 0x0C, 0x14, 0xD0, 0x80, 0x00, 0xCF, 0x60, 0x00, 0xA0, 0x03, 0xF0, 0x00, 0x20, 0x22, 0xD0, 0x80, 0x01, 0x51, 0x60, 0x00, 0xA0, 0x01, 
0x19, 0x1B, 0xF0, 0x00, 0x20, 0x1E, 0xD0, 0x80, 0xF0, 0x00, 0x0E, 0x69, 0x60, 0x08, 0xF0, 0x00, 0x01, 0xD0, 0x60, 0x01, 0xF0, 0x00, 0x30, 0x80, 0xF0, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x30, 0x01, 0xD0, 0x08, 0x83, 0x6D, 0x0C, 0x35, 0x60, 0x08, 0x40, 0x60, 0x39, 0x88, 0x60, 0x01, 0x41, 0xE2, 0x21, 0x96, 0x60, 0x03, 
0x19, 0x1B, 0x33, 0x00, 0x41, 0x44, 0xF0, 0x00, 0x33, 0x81, 0x70, 0x00, 0xF0, 0x00, 0x34, 0x02, 0x70, 0x00, 0xF0, 0x00, 0x34, 0x83, 0x0C, 0x29, 0x60, 0x09, 
0x19, 0x1B, 0x35, 0x04, 0x39, 0x96, 0x60, 0x00, 0x35, 0x85, 0x39, 0x9B, 0x60, 0x03, 0x30, 0x90, 0x70, 0x00, 0xF0, 0x00, 0x33, 0x93, 0x70, 0x00, 0xD0, 0x08, 
0x19, 0x1B, 0xF0, 0x00, 0x70, 0x00, 0xAF, 0x1A, 0xF0, 0x00, 0x70, 0x00, 0x8F, 0x5F, 0xF0, 0x00, 0x70, 0x00, 0xAF, 0x58, 0xF0, 0x00, 0x0C, 0x51, 0xD2, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x21, 0xA0, 0xD0, 0x80, 0xF0, 0x00, 0x05, 0x2E, 0xD2, 0x80, 0xF0, 0x00, 0x70, 0x00, 0xA0, 0x0E, 0xF0, 0x00, 0x21, 0xB7, 0xD0, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x1F, 0x32, 0xD2, 0x80, 0xF0, 0x00, 0x1E, 0x84, 0xD2, 0x80, 0xF0, 0x00, 0x21, 0xE0, 0xD0, 0x80, 0xF0, 0x00, 0x1E, 0xA4, 0xD2, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x07, 0xF7, 0xD2, 0x80, 0xF0, 0x00, 0x22, 0x15, 0xD0, 0x80, 0xF0, 0x00, 0x07, 0xFB, 0xD2, 0x80, 0xF0, 0x00, 0x22, 0x8F, 0xD0, 0x80, 
0x19, 0x1B, 0x40, 0x40, 0x22, 0xE1, 0xD2, 0x80, 0x40, 0x80, 0x22, 0xE2, 0xD2, 0x80, 0xF0, 0x00, 0x22, 0x9C, 0xD0, 0x80, 0xF0, 0x00, 0x07, 0xFB, 0xD2, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x22, 0xB6, 0xD0, 0x80, 0xF0, 0x00, 0x20, 0xF0, 0xD2, 0x80, 0x90, 0x02, 0x27, 0xDF, 0xD2, 0x80, 0x9E, 0x69, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x07, 0x00, 0xD1, 0x80, 0xF0, 0x00, 0x23, 0x20, 0xD0, 0x80, 0x90, 0x82, 0x0C, 0x29, 0x60, 0x09, 0x40, 0x17, 0x40, 0x67, 0xE6, 0x40, 
0x19, 0x1B, 0xF0, 0x00, 0x70, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x32, 0x17, 0xD0, 0x08, 0xF0, 0x00, 0x07, 0xF7, 0xD2, 0x80, 0xF0, 0x00, 0x27, 0xEA, 0xD2, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x11, 0xB5, 0xD0, 0x80, 0x17, 0x0B, 0x60, 0x0C, 0xA0, 0x41, 0x00, 0x40, 0x40, 0x05, 0xF0, 0x00, 0x00, 0x41, 0x24, 0x3F, 0xD0, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x70, 0x00, 0xAE, 0x8F, 0xF0, 0x00, 0x0C, 0x8D, 0x60, 0x08, 0xF0, 0x00, 0x26, 0x0A, 0xD0, 0x80, 0x83, 0xFF, 0x0D, 0x85, 0x60, 0x08, 
0x19, 0x1B, 0xF0, 0x00, 0x01, 0xF4, 0x60, 0x00, 0xF0, 0x00, 0x03, 0xB1, 0x60, 0x01, 0x10, 0x00, 0x03, 0xB2, 0x60, 0x02, 0x10, 0x01, 0x04, 0x0E, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x02, 0x04, 0x0F, 0x60, 0x01, 0x10, 0x00, 0x04, 0x5C, 0x60, 0x02, 0x10, 0x01, 0x04, 0x5D, 0x60, 0x00, 0x10, 0x02, 0x13, 0x80, 0x60, 0x01, 
0x19, 0x1B, 0x10, 0x00, 0x0D, 0x90, 0x60, 0x09, 0x10, 0x01, 0x02, 0xEE, 0x60, 0x00, 0x10, 0x07, 0x43, 0x06, 0x60, 0x01, 0x10, 0x10, 0x04, 0x69, 0x60, 0x02, 
0x19, 0x1B, 0x10, 0x11, 0x44, 0x87, 0x60, 0x00, 0x10, 0x12, 0x05, 0xE3, 0x60, 0x01, 0x10, 0x10, 0x46, 0x08, 0x60, 0x02, 0x10, 0x11, 0x06, 0xAE, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x12, 0x0D, 0x8E, 0x60, 0x08, 0x10, 0x10, 0x9E, 0x3C, 0x60, 0x00, 0x10, 0x17, 0x0D, 0x84, 0x60, 0x09, 0x10, 0x00, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0x10, 0x07, 0x70, 0x00, 0xF0, 0x00, 0x10, 0x17, 0x70, 0x00, 0xD0, 0x08, 0x0C, 0xDF, 0x60, 0x0B, 0xA0, 0x24, 0x30, 0x30, 0x23, 0xD6, 0xD2, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x26, 0xE8, 0xD0, 0x80, 0x0D, 0x85, 0x60, 0x08, 0xA0, 0x21, 0xF0, 0x00, 0x00, 0x02, 0xA0, 0x20, 0x90, 0x82, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0x82, 0x8A, 0x70, 0x00, 0x90, 0x03, 0x90, 0x8A, 0x70, 0x00, 0x90, 0x01, 0xF0, 0x00, 0x70, 0x00, 0x8F, 0xFB, 0x82, 0xBF, 0x70, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x01, 0x99, 0xD2, 0x80, 0xF0, 0x00, 0x0D, 0x84, 0x60, 0x08, 0xF0, 0x00, 0x26, 0xC1, 0xF0, 0x00, 0xF0, 0x00, 0x00, 0x02, 0xA0, 0x17, 
0x19, 0x1B, 0x90, 0x82, 0x70, 0x00, 0xF0, 0x00, 0x82, 0x8A, 0x70, 0x00, 0x90, 0x03, 0x90, 0x8A, 0x70, 0x00, 0x90, 0x01, 0xF0, 0x00, 0x70, 0x00, 0x8F, 0xFB, 
0x19, 0x1B, 0x82, 0x80, 0x70, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x70, 0x00, 0xD0, 0x08, 0xF0, 0x00, 0x0D, 0x90, 0x60, 0x0D, 0xF0, 0x00, 0x3F, 0xFF, 0x60, 0x02, 
0x19, 0x1B, 0xF0, 0x00, 0x00, 0x51, 0xA0, 0x0E, 0xC2, 0x53, 0x70, 0x00, 0xF0, 0x00, 0x8E, 0xC4, 0x70, 0x00, 0x90, 0x01, 0xF0, 0x00, 0x70, 0x00, 0x97, 0xFC, 
0x19, 0x1B, 0xD4, 0x8F, 0x01, 0x99, 0xD2, 0x80, 0x40, 0x05, 0x0D, 0x8E, 0x60, 0x0D, 0x40, 0x17, 0x3F, 0xFF, 0x60, 0x02, 0x9F, 0x7D, 0x00, 0x51, 0xA0, 0x07, 
0x19, 0x1B, 0xC2, 0x53, 0x70, 0x00, 0xF0, 0x00, 0x82, 0xC4, 0x27, 0x1C, 0xD1, 0x80, 0xF0, 0x00, 0x70, 0x00, 0x97, 0xFC, 0x91, 0x46, 0x27, 0x20, 0xD0, 0x80, 
0x19, 0x1B, 0xF0, 0x00, 0x29, 0x15, 0xD2, 0x80, 0xF0, 0x00, 0x39, 0xEC, 0xD2, 0x80, 0xF0, 0x00, 0x28, 0x88, 0xD0, 0x80, 0xF0, 0x00, 0x70, 0x00, 0xD0, 0x08, 
0x19, 0x1B, 0xF0, 0x00, 0x16, 0xC3, 0x60, 0x08, 0xF0, 0x00, 0x00, 0x9A, 0x60, 0x00, 0xF0, 0x00, 0x02, 0xE3, 0x60, 0x00, 0x10, 0x00, 0x04, 0xF4, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0x06, 0xFF, 0x60, 0x00, 0x10, 0x00, 0x09, 0x07, 0x60, 0x00, 0x10, 0x00, 0x0B, 0x10, 0x60, 0x00, 0x10, 0x00, 0x0D, 0x1F, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0x0F, 0x65, 0x60, 0x00, 0x10, 0x00, 0x0F, 0x65, 0x60, 0x00, 0x10, 0x00, 0x0D, 0x1F, 0x60, 0x00, 0x10, 0x00, 0x0B, 0x10, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0x09, 0x07, 0x60, 0x00, 0x10, 0x00, 0x06, 0xFF, 0x60, 0x00, 0x10, 0x00, 0x04, 0xF4, 0x60, 0x00, 0x10, 0x00, 0x02, 0xE3, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0x00, 0x9A, 0x60, 0x00, 0xF0, 0x00, 0x10, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x10, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x16, 0xD3, 0x60, 0x08, 
0x19, 0x1B, 0xF0, 0x00, 0xFF, 0x93, 0x60, 0x00, 0xF0, 0x00, 0xFE, 0x37, 0x60, 0x00, 0x10, 0x00, 0xFD, 0xD9, 0x60, 0x00, 0x10, 0x00, 0xFE, 0x9F, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0x03, 0x85, 0x60, 0x00, 0x10, 0x00, 0x0D, 0x6B, 0x60, 0x00, 0x10, 0x00, 0x16, 0x84, 0x60, 0x00, 0x10, 0x00, 0x1E, 0x49, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0x1E, 0x49, 0x60, 0x00, 0x10, 0x00, 0x16, 0x84, 0x60, 0x00, 0x10, 0x00, 0x0D, 0x6B, 0x60, 0x00, 0x10, 0x00, 0x03, 0x85, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0xFE, 0x9F, 0x60, 0x00, 0x10, 0x00, 0xFD, 0xD9, 0x60, 0x00, 0x10, 0x00, 0xFE, 0x37, 0x60, 0x00, 0x10, 0x00, 0xFF, 0x93, 0x60, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x10, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x10, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x16, 0xE3, 0x60, 0x08, 0xF0, 0x00, 0x00, 0x64, 0x60, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0xFF, 0xA8, 0x60, 0x00, 0x10, 0x00, 0xFF, 0xA6, 0x60, 0x00, 0x10, 0x00, 0xFF, 0xDF, 0x60, 0x00, 0x10, 0x00, 0x00, 0x01, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0x01, 0x28, 0x60, 0x00, 0x10, 0x00, 0x01, 0x2F, 0x60, 0x00, 0x10, 0x00, 0xFD, 0x23, 0x60, 0x00, 0x10, 0x00, 0xFD, 0xA1, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0x03, 0x89, 0x60, 0x00, 0x10, 0x00, 0x02, 0x54, 0x60, 0x00, 0x10, 0x00, 0xFE, 0x7D, 0x60, 0x00, 0x10, 0x00, 0x00, 0x8C, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0xFB, 0xE1, 0x60, 0x00, 0x10, 0x00, 0xF9, 0x42, 0x60, 0x00, 0x10, 0x00, 0x0C, 0x47, 0x60, 0x00, 0x10, 0x00, 0x0E, 0xA2, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0xEC, 0x43, 0x60, 0x00, 0x10, 0x00, 0xEA, 0xCE, 0x60, 0x00, 0x10, 0x00, 0x17, 0x46, 0x60, 0x00, 0x10, 0x00, 0x17, 0x46, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0xEA, 0xCE, 0x60, 0x00, 0x10, 0x00, 0xEC, 0x43, 0x60, 0x00, 0x10, 0x00, 0x0E, 0xA2, 0x60, 0x00, 0x10, 0x00, 0x0C, 0x47, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0xF9, 0x42, 0x60, 0x00, 0x10, 0x00, 0xFB, 0xE1, 0x60, 0x00, 0x10, 0x00, 0x00, 0x8C, 0x60, 0x00, 0x10, 0x00, 0xFE, 0x7D, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0x02, 0x54, 0x60, 0x00, 0x10, 0x00, 0x03, 0x89, 0x60, 0x00, 0x10, 0x00, 0xFD, 0xA1, 0x60, 0x00, 0x10, 0x00, 0xFD, 0x23, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0x01, 0x2F, 0x60, 0x00, 0x10, 0x00, 0x01, 0x28, 0x60, 0x00, 0x10, 0x00, 0x00, 0x01, 0x60, 0x00, 0x10, 0x00, 0xFF, 0xDF, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0xFF, 0xA6, 0x60, 0x00, 0x10, 0x00, 0xFF, 0xA8, 0x60, 0x00, 0x10, 0x00, 0x00, 0x64, 0x60, 0x00, 0xF0, 0x00, 0x10, 0x00, 0xF0, 0x00, 
0x19, 0x1B, 0xF0, 0x00, 0x10, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x17, 0x0B, 0x60, 0x08, 0xF0, 0x00, 0x00, 0x03, 0x60, 0x00, 0xF0, 0x00, 0x54, 0xC0, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0x00, 0x05, 0x60, 0x00, 0x10, 0x00, 0x00, 0x05, 0x60, 0x00, 0x10, 0x00, 0x00, 0x0F, 0x60, 0x00, 0x10, 0x00, 0x00, 0x0F, 0x60, 0x00, 
0x19, 0x1B, 0x10, 0x00, 0x09, 0xC0, 0x60, 0x00, 0x10, 0x00, 0x0A, 0x20, 0x60, 0x00, 0x10, 0x00, 0x1D, 0x40, 0x60, 0x00, 0x10, 0x00, 0x1E, 0x60, 0x60, 0x00, 
0x13, 0x1B, 0xF0, 0x00, 0x10, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x10, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x70, 0x00, 0xD0, 0x08,

	0x03, 0x1C, 0x00, 0x00, 
	0x03, 0x1C, 0x00, 0x75, 
0x57, 0x1B, 0x40, 0x13, 0x40, 0x2F, 0x41, 0x68, 0x41, 0xC1, 0x42, 0x14, 0x44, 0xDE, 0x47, 0xC5, 0x47, 0xFC, 0x4E, 0x56, 0x4E, 0x58, 0x4D, 0x83, 0x4E, 0x49, 0x4E, 0x53, 0x4F, 0x92, 0x4F, 0xEA, 0x50, 0x80, 0x56, 0x60, 0x56, 0xD4, 0x56, 0xD9, 0x59, 0xB4, 0x5A, 0x3A, 0x5B, 0x7E, 0x5D, 0xDC, 0x60, 0x67, 0x60, 0x88, 0x60, 0xA8, 0x61, 0x9F, 0x61, 0xB6, 0x61, 0xDF, 0x62, 0x14, 0x62, 0x59, 0x62, 0x9B, 0x62, 0xA1, 0x63, 0x69, 0x64, 0x3B, 0x66, 0x09, 0x66, 0xE7, 0x67, 0x0B, 0x67, 0x1A, 0x68, 0x87, 0x68, 0x99, 0x68, 0xA7, 0x68, 0xB2, 
	0x03, 0x1C, 0x00, 0x00,
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	0x03, 0x14, 0x00, 0x01,		// Need Wait	// S C8 40 80 00 RS C9 40 80 00 01 P
	// INFO  Start Firmware...(Boot state is set to Idle State)
	// INFO  Get Identification...: TEF6657 (A2Premium)
	#ifdef  ATOMIC_CLOCK_9216000Hz		// 9MHz ???
	0x09, 0x40, 0x04, 0x01, 0x00, 0x8C, 0xA0, 0x00, 0x00, 0x00, 			// ??
	#endif		// 4MHz
	#ifdef  ATOMIC_CLOCK_4MHz
	0x09, 0x40, 0x04, 0x01, 0x00, 0x3D, 0x09, 0x00, 0x00, 0x00,
	#endif
	// INFO  Activate Device...(Idle state is set to Active state)
	0x05, 0x40, 0x05, 0x01, 0x00, 0x01, 
	// INFO  Set Frequency to 91900 kHz, (Area=Europe, Band=FM, Tuning_Mode=Preset)
	0x07, 0x20, 0x01, 0x01, 0x00, 0x01, 0x23, 0xE6, 
	0x0B, 0x20, 0x0A, 0x01, 0x00, 0x01, 0x09, 0x38, 0x03, 0xE8, 0x03, 0xE8, 
	0x05, 0x20, 0x1F, 0x01, 0x01, 0xF4, 
	0x0B, 0x20, 0x53, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x32, 0x00, 0x00, 
	0x09, 0x20, 0x54, 0x01, 0x00, 0x00, 0x22, 0x04, 0x10, 0x10, 
	0x05, 0x20, 0x14, 0x01, 0x00, 0x01, 			// Set_MphSuppression : 1 = on
	0x07, 0x20, 0x17, 0x01, 0x00, 0x01, 0x03, 0xE8, 
	0x07, 0x20, 0x52, 0x01, 0x00, 0x00, 0x00, 0x00, 
	0x07, 0x20, 0x52, 0x01, 0x00, 0xC8, 0x00, 0x00, 
	0x07, 0x20, 0x0B, 0x01, 0x03, 0x98, 0x00, 0x00, 
	0x05, 0x20, 0x50, 0x01, 0x00, 0x00, 
	0x05, 0x20, 0x55, 0x01, 0x00, 0x00, 
	0x0B, 0x20, 0x02, 0x01, 0x00, 0x00, 0x09, 0x38, 0x03, 0xE8, 0x07, 0xD0, 
	0x09, 0x20, 0x51, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 
#if  0
	0x11, 0x20, 0x26, 0x01, 0x00, 0x00, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 
	0x11, 0x20, 0x26, 0x01, 0x00, 0x00, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 
	0x11, 0x20, 0x26, 0x01, 0x00, 0x00, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 
	0x11, 0x20, 0x26, 0x01, 0x00, 0x00, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 
	0x11, 0x20, 0x26, 0x01, 0x00, 0x00, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 
	0x11, 0x20, 0x26, 0x01, 0x00, 0x00, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 
	0x11, 0x20, 0x26, 0x01, 0x00, 0x00, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 
#else
	0x11, 0x20, 0x26, 0x01, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x20, 0x26, 0x01, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x20, 0x26, 0x01, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x20, 0x26, 0x01, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x20, 0x26, 0x01, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x20, 0x26, 0x01, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x20, 0x26, 0x01, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 0xFF, 0xC4, 
#endif
	0x05, 0x20, 0x27, 0x01, 0x00, 0x00, 
	0x09, 0x20, 0x2A, 0x01, 0x00, 0x02, 0x00, 0x96, 0x00, 0xDC, 
	0x0B, 0x20, 0x28, 0x01, 0x00, 0x78, 0x01, 0xF4, 0x00, 0x0A, 0x00, 0x14, 
	0x09, 0x20, 0x2C, 0x01, 0x00, 0x00, 0x01, 0xF4, 0x03, 0xE8, 
	0x09, 0x20, 0x2B, 0x01, 0x00, 0x00, 0x01, 0xF4, 0x03, 0xE8, 
	0x07, 0x20, 0x2D, 0x01, 0x00, 0x01, 0x00, 0xC8, 
	0x09, 0x20, ATOMIC_SET_HIGHCUT_LEVEL, 0x01, 0x00, 0x03, 0x01, 0xAE, 0x01, 0x2C, 
	0x0B, 0x20, 0x32, 0x01, 0x00, 0xC8, 0x07, 0xD0, 0x00, 0x0A, 0x00, 0x50, 
	0x0B, 0x20, ATOMIC_SET_HIGHCUT_MOD, 0x01, 0x00, 0x00, 0x00, 0xFA, 0x00, 0x82, 0x01, 0xF4, 
	0x09, 0x20, 0x36, 0x01, 0x00, 0x03, 0x00, 0xB4, 0x00, 0xC8, 
	0x09, 0x20, 0x35, 0x01, 0x00, 0x03, 0x00, 0x96, 0x00, 0xC8, 
	0x07, 0x20, 0x3A, 0x01, 0x00, 0x00, 0x00, 0x14, 
	0x07, 0x20, ATOMIC_SET_HIGHCUT_MAX, 0x01, 0x00, 0x01, 0x09, 0x60, 
	0x05, 0x20, ATOMIC_SET_HIGHCUT_OPTION, 0x01, 0x00, 0x01, 
	0x07, 0x20, ATOMIC_SET_HIGHCUT_MIN, 0x01, 0x00, 0x00, 0x3A, 0x98, 
	0x07, 0x20, 0x37, 0x01, 0x00, 0x01, 0x09, 0x60, 
	0x09, 0x20, 0x3E, 0x01, 0x00, 0x03, 0x01, 0xCC, 0x00, 0xF0, 
	0x0B, 0x20, 0x3C, 0x01, 0x00, 0xC8, 0x0F, 0xA0, 0x00, 0x14, 0x00, 0x50, 
	0x0B, 0x20, 0x3D, 0x01, 0x00, 0x00, 0x00, 0xD2, 0x00, 0x5A, 0x01, 0xF4, 
	0x09, 0x20, 0x40, 0x01, 0x00, 0x03, 0x00, 0xB4, 0x00, 0x96, 
	0x09, 0x20, 0x3F, 0x01, 0x00, 0x03, 0x00, 0x78, 0x00, 0x96, 
	0x07, 0x20, 0x42, 0x01, 0x00, 0x00, 0x01, 0x90, 
	0x05, 0x20, 0x41, 0x01, 0x00, 0x01, 
	0x09, 0x40, 0x03, 0x01, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 
	0x09, 0x40, 0x03, 0x01, 0x00, 0x01, 0x00, 0x21, 0x00, 0x00, 
	0x09, 0x40, 0x03, 0x01, 0x00, 0x02, 0x00, 0x21, 0x00, 0x00, 
	0x09, 0x40, 0x03, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x03, 
	0x09, 0x40, 0x03, 0x01, 0x00, 0x01, 0x00, 0x20, 0x00, 0x00, 
	0x09, 0x40, 0x03, 0x01, 0x00, 0x02, 0x00, 0x20, 0x00, 0x00, 
	0x07, 0x30, 0x15, 0x01, 0x00, 0x80, 0x00, 0x01, 
	0x0D, 0x30, 0x16, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x11, 0x3A, 
	0x0D, 0x30, 0x16, 0x01, 0x00, 0x21, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x11, 0x3A, 
	0x05, 0x30, 0x0C, 0x01, 0x00, 0x00, 
	0x07, 0x30, 0x17, 0x01, 0x00, 0x20, 0x00, 0x00, 
	0x05, 0x30, 0x0B, 0x01, 0x00, 0x00, 
	0x05, 0x30, 0x0A, 0x01, 0xFF, 0x10, 
	0x0F, 0x30, 0x18, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x38, 0x01, 0x90, 0xFF, 0x38, 0x03, 0xE8, 
	0x07, 0x30, 0x0D, 0x01, 0x00, 0x21, 0x00, 0xE0, 
	0x07, 0x30, 0x0D, 0x01, 0x00, 0x80, 0x00, 0xE0, 
#if  1	  // AUDIO_Set_WaveGen
//	15, 0x30, 0x18, 0x01, 0x00, 0x05, 0x00, 0x00, 0xFF, 0x38, 0x07, 0xD0, 0xFF, 0x38, 0x03, 0xE8,
												//   AMP : -10dB //
	15, 0x30, 0x18, 0x01, 0x00, 0x05, 0x00, 0x01,    0xFF, 0x9B,    0x07, 0xD0, 0xFF, 0x38, 0x03, 0xE8,
#endif
#if  0// INFO  Set Frequency to 2300 kHz, (Area=Europe, Band=SW, Tuning_Mode=Preset)
//	0x07, 0x21, 0x01, 0x01, 0x00, 0x01, 0x08, 0xFC, 
	0x05, 0x21, 0x0C, 0x01, 0x00, 0x00, 
	0x07, 0x21, 0x0A, 0x01, 0x00, 0x00, 0x00, 0x28, 
	0x0B, 0x21, 0x53, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x32, 0x00, 0x00, 
	0x09, 0x21, 0x54, 0x01, 0x00, 0x00, 0x22, 0x04, 0x10, 0x10, 
	0x07, 0x21, 0x17, 0x01, 0x00, 0x01, 0x03, 0xE8, 
	0x07, 0x21, 0x18, 0x01, 0x00, 0x01, 0x03, 0xE8, 
	0x07, 0x21, 0x52, 0x01, 0x00, 0xC8, 0x00, 0x00, 
	0x05, 0x21, 0x0B, 0x01, 0x03, 0xE8, 
	0x05, 0x21, 0x50, 0x01, 0x00, 0x00, 
	0x05, 0x21, 0x55, 0x01, 0x00, 0x00, 
	0x07, 0x21, 0x52, 0x01, 0x00, 0x00, 0x00, 0x00, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x05, 0x20, 0x27, 0x01, 0x00, 0x00, 
	0x09, 0x21, 0x2A, 0x01, 0x00, 0x02, 0x01, 0x18, 0x00, 0xFA, 
	0x0B, 0x21, 0x28, 0x01, 0x00, 0x78, 0x01, 0xF4, 0x00, 0x78, 0x01, 0xF4, 
	0x07, 0x21, 0x2D, 0x01, 0x00, 0x01, 0x00, 0xFA, 
	0x09, 0x21, 0x34, 0x01, 0x00, 0x02, 0x01, 0xD6, 0x00, 0xC8, 
	0x0B, 0x21, 0x32, 0x01, 0x01, 0xF4, 0x07, 0xD0, 0x00, 0x78, 0x01, 0xF4, 
	0x0B, 0x21, 0x33, 0x01, 0x00, 0x00, 0x00, 0xFA, 0x00, 0x82, 0x01, 0xF4, 
	0x07, 0x21, 0x3A, 0x01, 0x00, 0x01, 0x00, 0x14, 
	0x07, 0x21, 0x37, 0x01, 0x00, 0x01, 0x07, 0x08, 
#endif
#if  1	// INFO  Set Frequency to 999 kHz, (Area=Europe, Band=MW, Tuning_Mode=Preset)	// INFO  Set Frequency to 990 kHz, (Area=Europe, Band=MW, Tuning_Mode=Preset)
//	0x07, 0x21, 0x01, 0x01, 0x00, 0x01, 0x03, 0xDE, 
	0x05, 0x21, 0x0C, 0x01, 0x00, 0x00, 
	0x07, 0x21, 0x0A, 0x01, 0x00, 0x00, 0x00, 0x28, 
	0x0B, 0x21, 0x53, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x32, 0x00, 0x00, 
	0x09, 0x21, 0x54, 0x01, 0x00, 0x00, 0x22, 0x04, 0x10, 0x10, 
	0x07, 0x21, 0x17, 0x01, 0x00, 0x01, 0x03, 0xE8, 
	0x07, 0x21, 0x18, 0x01, 0x00, 0x01, 0x03, 0xE8, 
	0x07, 0x21, 0x52, 0x01, 0x00, 0xC8, 0x00, 0x00, 
	0x05, 0x21, 0x0B, 0x01, 0x03, 0xE8, 
	0x05, 0x21, 0x50, 0x01, 0x00, 0x00, 
	0x05, 0x21, 0x55, 0x01, 0x00, 0x00, 
	0x07, 0x21, 0x52, 0x01, 0x00, 0x00, 0x00, 0x00, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x05, 0x21, 0x27, 0x01, 0x00, 0x00, 
	0x09, 0x21, 0x2A, 0x01, 0x00, 0x02, 0x01, 0x18, 0x00, 0xFA, 
	0x0B, 0x21, 0x28, 0x01, 0x00, 0x78, 0x01, 0xF4, 0x00, 0x78, 0x01, 0xF4, 
	0x07, 0x21, 0x2D, 0x01, 0x00, 0x01, 0x00, 0xFA, 
	0x09, 0x21, 0x34, 0x01, 0x00, 0x02, 0x01, 0xD6, 0x00, 0xC8, 
	0x0B, 0x21, 0x32, 0x01, 0x01, 0xF4, 0x07, 0xD0, 0x00, 0x78, 0x01, 0xF4, 
	0x0B, 0x21, 0x33, 0x01, 0x00, 0x00, 0x00, 0xFA, 0x00, 0x82, 0x01, 0xF4, 
	0x07, 0x21, 0x3A, 0x01, 0x00, 0x01, 0x00, 0x14, 
	0x07, 0x21, 0x37, 0x01, 0x00, 0x01, 0x07, 0x08,
#endif
#if  0// INFO  Set Frequency to 153 kHz, (Area=Europe, Band=LW, Tuning_Mode=Preset)
//	0x07, 0x21, 0x01, 0x01, 0x00, 0x01, 0x00, 0x99, 
	0x05, 0x21, 0x0C, 0x01, 0x00, 0x00, 
	0x07, 0x21, 0x0A, 0x01, 0x00, 0x00, 0x00, 0x28, 
	0x0B, 0x21, 0x53, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x32, 0x00, 0x00, 
	0x09, 0x21, 0x54, 0x01, 0x00, 0x00, 0x22, 0x04, 0x10, 0x10, 
	0x07, 0x21, 0x17, 0x01, 0x00, 0x01, 0x03, 0xE8, 
	0x07, 0x21, 0x18, 0x01, 0x00, 0x01, 0x03, 0xE8, 
	0x07, 0x21, 0x52, 0x01, 0x00, 0xC8, 0x00, 0x00, 
	0x05, 0x21, 0x0B, 0x01, 0x03, 0xE8, 
	0x05, 0x21, 0x50, 0x01, 0x00, 0x00, 
	0x05, 0x21, 0x55, 0x01, 0x00, 0x00, 
	0x07, 0x21, 0x52, 0x01, 0x00, 0x00, 0x00, 0x00, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x11, 0x21, 0x26, 0x01, 0xFF, 0xF6, 0xFF, 0xEC, 0xFF, 0xE2, 0xFF, 0xD8, 0xFF, 0xCE, 0xFF, 0xC4, 0xFF, 0xC4, 
	0x05, 0x20, 0x27, 0x01, 0x00, 0x00, 
	0x09, 0x21, 0x2A, 0x01, 0x00, 0x02, 0x01, 0x54, 0x01, 0x2C, 
	0x0B, 0x21, 0x28, 0x01, 0x00, 0x78, 0x01, 0xF4, 0x00, 0x78, 0x01, 0xF4, 
	0x07, 0x21, 0x2D, 0x01, 0x00, 0x01, 0x01, 0x4A, 
	0x09, 0x21, 0x34, 0x01, 0x00, 0x02, 0x02, 0x08, 0x00, 0xC8, 
	0x0B, 0x21, 0x32, 0x01, 0x01, 0xF4, 0x07, 0xD0, 0x00, 0x78, 0x01, 0xF4, 
	0x0B, 0x21, 0x33, 0x01, 0x00, 0x00, 0x00, 0xFA, 0x00, 0x82, 0x01, 0xF4, 
	0x07, 0x21, 0x3A, 0x01, 0x00, 0x01, 0x00, 0x14, 
	0x07, 0x21, 0x37, 0x01, 0x00, 0x01, 0x07, 0x08, 
#endif
	// INFO  Device TEF6657 (A2Premium) Fully Initialised, Waiting for User Event........

	0x05, 0x40, 0x01, 0x01, 0x00, 0x00,		// Set_OperationMode : 0 = normal operation
	0x05, 0x20, 0x1E, 0x01, 0x00, 0x00, 	// Disable digital radio for FM use
	0x05, 0x21, 0x1E, 0x01, 0x00, 0x00, 	// Disable digital radio for AM use 
	0x05, 0x21, 0x50, 0x01, 0xFF, 0x88,
	0xFF
};

void ATOMIC_SetFrequency(unsigned short usFreq)
{
	ucNXP_I2CData[0] = ucATOMIC_Band; ucNXP_I2CData[1] = 0x01; ucNXP_I2CData[2] = 0x01; 
	ucNXP_I2CData[3] = 0x00; ucNXP_I2CData[4] = 0x01;
	ucNXP_I2CData[5] = (unsigned char)(usFreq >> 8);
	ucNXP_I2CData[6] = (unsigned char)usFreq;
	NXP_I2C_Send(&ucNXP_I2CData[0], 7);
}

void ATOMIC_SetFrequencyForSeek(unsigned short usFreq)
{
	ucNXP_I2CData[0] = ucATOMIC_Band; ucNXP_I2CData[1] = 0x01; ucNXP_I2CData[2] = 0x01; 
	ucNXP_I2CData[3] = 0x00; ucNXP_I2CData[4] = 0x02;
	ucNXP_I2CData[5] = (unsigned char)(usFreq >> 8);
	ucNXP_I2CData[6] = (unsigned char)usFreq;
	NXP_I2C_Send(&ucNXP_I2CData[0], 7);
	LOG_ATOMIC("F:%d",usFreq);
}

void ATOMIC_SetDeEmphasis(UI_LOCAL ucLocal, unsigned char ucBand)
{	
	if  (ucBand == FM)	// FM
	{
		switch  (ucLocal)
		{
			default:
				ucNXP_I2CData[0x00] = 0x20; ucNXP_I2CData[0x01] = 0x1F; ucNXP_I2CData[0x02] = 0x01;
				ucNXP_I2CData[0x03] = 0x02; ucNXP_I2CData[0x04] = 0xEE;	// 0x02EE = 750
				break;
			case LOCAL_EUROPE:
				ucNXP_I2CData[0x00] = 0x20; ucNXP_I2CData[0x01] = 0x1F; ucNXP_I2CData[0x02] = 0x01;
				ucNXP_I2CData[0x03] = 0x01; ucNXP_I2CData[0x04] = 0xF4; // 0x01F4 = 500
				break;
		}
		NXP_I2C_Send(&ucNXP_I2CData[0], 0x05);
	}
	else	// AM
	{
	}
}

void ATOMIC_SetBand(unsigned char ucBand, unsigned short usFreq)
{
	unsigned char i;
	unsigned char DataCnt;
//	unsigned char const *Table;
	
	switch  (ucBand)
	{
		case 0x00:	// FM
			ucATOMIC_Band = 0x20;
			ucNXP_I2CData[0] = ucATOMIC_Band; 
			ucNXP_I2CData[1] = 0x01; ucNXP_I2CData[2] = 0x01; ucNXP_I2CData[3] = 0x00; ucNXP_I2CData[4] = 0x01;
			ucNXP_I2CData[5] = (unsigned char)(usFreq >> 8);
			ucNXP_I2CData[6] = (unsigned char)usFreq;
			NXP_I2C_Send(&ucNXP_I2CData[0], 7);
//			Table = &ucATOMIC_FM_Table[0];
			ATOMIC_SetVolumeFM();
			break;
		case 0x01:	// MW
			ucATOMIC_Band = 0x21;
			ucNXP_I2CData[0] = ucATOMIC_Band; 
			ucNXP_I2CData[1] = 0x01; ucNXP_I2CData[2] = 0x01; ucNXP_I2CData[3] = 0x00; ucNXP_I2CData[4] = 0x01;
			ucNXP_I2CData[5] = (unsigned char)(usFreq >> 8);
			ucNXP_I2CData[6] = (unsigned char)usFreq;
			NXP_I2C_Send(&ucNXP_I2CData[0], 7);
			ATOMIC_SetVolumeAM();
			#if 0
			usATOMIC_DataCnt = 0;
			while(1)
			{
				DataCnt = ucATOMIC_MW_Table[usATOMIC_DataCnt];
				++usATOMIC_DataCnt;
				for(i = 0; i < DataCnt; ++i)
				{
					ucNXP_I2CData[i] = ucATOMIC_MW_Table[usATOMIC_DataCnt];
					++usATOMIC_DataCnt;
				}
				NXP_I2C_Send(&ucNXP_I2CData[0], DataCnt);
				if  (ucATOMIC_MW_Table[usATOMIC_DataCnt] == 0xFF)
				{
					break;
				}
			}
			#endif
			break;
		case 0x02:	// LW
			ucATOMIC_Band = 0x21;
			ucNXP_I2CData[0] = ucATOMIC_Band; 
			ucNXP_I2CData[1] = 0x01; ucNXP_I2CData[2] = 0x01; ucNXP_I2CData[3] = 0x00; ucNXP_I2CData[4] = 0x01;
			ucNXP_I2CData[5] = (unsigned char)(usFreq >> 8);
			ucNXP_I2CData[6] = (unsigned char)usFreq;
			NXP_I2C_Send(&ucNXP_I2CData[0], 7);
			ATOMIC_SetVolumeAM();
		#if  0
			while(1)
			{
				DataCnt = ucATOMIC_LW_Table[usATOMIC_DataCnt];
				++usATOMIC_DataCnt;
				for(i = 0; i < DataCnt; ++i)
				{
					ucNXP_I2CData[i] = ucATOMIC_LW_Table[usATOMIC_DataCnt];
					++usATOMIC_DataCnt;
				}
				NXP_I2C_Send(&ucNXP_I2CData[0], DataCnt);
				if  (ucATOMIC_LW_Table[usATOMIC_DataCnt] == 0xFF)
				{
					break;
				}
			}
		#endif
			break;
		case 0x03:	// SW
			ucATOMIC_Band = 0x21;
			ucNXP_I2CData[0] = ucATOMIC_Band; 
			ucNXP_I2CData[1] = 0x01; ucNXP_I2CData[2] = 0x01; ucNXP_I2CData[3] = 0x00; ucNXP_I2CData[4] = 0x01;
			ucNXP_I2CData[5] = (unsigned char)(usFreq >> 8);
			ucNXP_I2CData[6] = (unsigned char)usFreq;
			NXP_I2C_Send(&ucNXP_I2CData[0], 7);
			ATOMIC_SetVolumeAM();
		#if  0
			while(1)
			{
				DataCnt = ucATOMIC_SW_Table[usATOMIC_DataCnt];
				++usATOMIC_DataCnt;
				for(i = 0; i < DataCnt; ++i)
				{
					ucNXP_I2CData[i] = ucATOMIC_SW_Table[usATOMIC_DataCnt];
					++usATOMIC_DataCnt;
				}
				NXP_I2C_Send(&ucNXP_I2CData[0], DataCnt);
				if  (ucATOMIC_SW_Table[usATOMIC_DataCnt] == 0xFF)
				{
					break;
				}
			}
		#endif
			break;
	}
}

void ATOMIC_SetInput(unsigned char ucInput)
{
	switch  (ucInput)
	{
		case 0x00:	// Radio
			ucNXP_I2CData[0] = 0x30; ucNXP_I2CData[1] = 0x0C; ucNXP_I2CData[2] = 0x01;
			ucNXP_I2CData[3] = 0x00; ucNXP_I2CData[4] = 0x00;
			break;
		case 0x01:	// I2S
			ucNXP_I2CData[0] = 0x30; ucNXP_I2CData[1] = 0x0C; ucNXP_I2CData[2] = 0x01;
			ucNXP_I2CData[3] = 0x00; ucNXP_I2CData[4] = 0x20;
			break;
		case 0x02:	// Sine Gen
			ucNXP_I2CData[0] = 0x30; ucNXP_I2CData[1] = 0x0C; ucNXP_I2CData[2] = 0x01;
			ucNXP_I2CData[3] = 0x00; ucNXP_I2CData[4] = 0xF0;
			break;
	}
}

/*//////////////////////////////////////////////////////////////////////////
Title : void ATOMIC_SetBandWidth(unsigned char ucBand, unsigned char ucOpt)
ucOpt
0 : Normal
1 : Seek
///////////////////////////////////////////////////////////////////////////*/
void ATOMIC_SetBandWidth(unsigned char ucBand, unsigned char ucOpt)
{
	unsigned short usBandwidth;
	unsigned short usControlSensitivity;
	unsigned short usLowLevelSensitivity;
	
	switch  (ucBand)
	{
		case 0x00:	// FM
		#if  1
			if  (ucOpt == 0)
			{
			// S C8 20 0A 01 00 01 09 38 03 E8 03 E8 P
				usBandwidth = 2360;	// 236 KHz
				usControlSensitivity = 1000;	// 100 %
				usLowLevelSensitivity = 1000;	// 100 %
				
				ucNXP_I2CData[3] = 0x00; ucNXP_I2CData[4] = 0x01;	// Mode : 1 = automatic (default)
			}
			else
			{
			// S C8 20 0A 01 00 01 03 CA 03 E8 03 E8 P
				usBandwidth = 3110;//2360;	// 560 ~ 3110 : 56kHz ~ 311kHz
				usControlSensitivity = 1000;	// 100 %
				usLowLevelSensitivity = 1000;	// 100 %

				ucNXP_I2CData[3] = 0x00; ucNXP_I2CData[4] = 0x00;	// Mode : 0 = fixed
			}
			ucBand = 0x20;
			ucNXP_I2CData[0] = ucBand; ucNXP_I2CData[1] = 0x0A; ucNXP_I2CData[2] = 0x01;
			ucNXP_I2CData[5] = (unsigned char)(usBandwidth >> 8);
			ucNXP_I2CData[6] = (unsigned char)usBandwidth;
			ucNXP_I2CData[7] = (unsigned char)(usControlSensitivity >> 8);
			ucNXP_I2CData[8] = (unsigned char)usControlSensitivity;
			ucNXP_I2CData[9] = (unsigned char)(usLowLevelSensitivity >> 8);
			ucNXP_I2CData[10] = (unsigned char)usLowLevelSensitivity;
			NXP_I2C_Send(&ucNXP_I2CData[0], 11);
		#endif
			break;
		case 0x01:	// MW
		case 0x02:	// LW
		case 0x03:	// SW
			if  (ucOpt == 0)
			{//	21 0A 01 00 00 00 28 	// AM_Set_Bandwidth
				usBandwidth = 40;
			}
			else
			{//	21 0A 01 00 00 00 1E 	// AM_Set_Bandwidth
				usBandwidth = 30;
			}
			ucBand = 0x21;
			ucNXP_I2CData[0] = ucBand; ucNXP_I2CData[1] = 0x0A; ucNXP_I2CData[2] = 0x01;
			ucNXP_I2CData[3] = 0x00; ucNXP_I2CData[4] = 0x00;	// Mode
			ucNXP_I2CData[5] = (unsigned char)(usBandwidth >> 8);
			ucNXP_I2CData[6] = (unsigned char)usBandwidth;
			NXP_I2C_Send(&ucNXP_I2CData[0], 7);
			break;
	}
	
}

unsigned short usATOMIC_StereoBlend;

unsigned char ATOMIC_GetProcessingStatus(void)
{
	ucNXP_I2CData[0] = 0x20; ucNXP_I2CData[1] = 0x86; ucNXP_I2CData[2] = 0x01;
	NXP_I2C_SendRead(&ucNXP_I2CData[0], 3, 6);

	usATOMIC_StereoBlend = ucNXP_I2CData[4];
	usATOMIC_StereoBlend = ((usATOMIC_StereoBlend << 8) & 0xFF00) | ucNXP_I2CData[5];
}
	

unsigned char ATOMIC_ReadStereoStatus(void)
{
	unsigned char ucStereo = 0;

	// 20 85 01 RS C9 00 00 	// FM_Get_Signal_Status
	ucNXP_I2CData[0] = 0x20; ucNXP_I2CData[1] = 0x85; ucNXP_I2CData[2] = 0x01;
	NXP_I2C_SendRead(&ucNXP_I2CData[0], 3, 2);

	if  (((ucNXP_I2CData[0] & 0x80) == 0x80) && (sATOMIC_SignalLevel > 50))
	{
		ucStereo = 1;	// FM Stereo
	}
	else
	{
		ucStereo = 0;	// Mono
	}
	if  ((ucNXP_I2CData[0] & 0x40) == 0x40)
	{
		// Digital
	}
	else
	{
		// Analog signal
	}
	
	ATOMIC_GetProcessingStatus();
	
	return(ucStereo);
}

#define	ATOMIC_FM_LEV		225//500//680
#define	ATOMIC_FM_USN		330
#define	ATOMIC_FM_WAM		330
#define	ATOMIC_FM_FOF		100//15

#define	ATOMIC_AM_LEV		400
#define	ATOMIC_AM_FOF		100//20

unsigned char ATOMIC_FM_GetSeekStopLevel(void)
{
	return(sATOMIC_FM_SeekStopLevel / 10);
}
unsigned char ATOMIC_AM_GetSeekStopLevel(void)
{
	return(sATOMIC_AM_SeekStopLevel / 10);
}

void ATOMIC_FM_SetSignalStopLevel(unsigned char ucUp)
{
	if  (ucUp == 1)
	{
		sATOMIC_FM_SeekStopLevel = sATOMIC_FM_SeekStopLevel + 10;
		if  (sATOMIC_FM_SeekStopLevel > 1200)
		{
			sATOMIC_FM_SeekStopLevel = 1200;
		}
	}
	else
	{
		if  (sATOMIC_FM_SeekStopLevel > 10)
		{
			sATOMIC_FM_SeekStopLevel = sATOMIC_FM_SeekStopLevel - 10;
		}
		if  (sATOMIC_FM_SeekStopLevel < 10)
		{
			sATOMIC_FM_SeekStopLevel = 0;
		}
	}
}

void ATOMIC_AM_SetSignalStopLevel(unsigned char ucUp)
{
	if  (ucUp == 1)
	{
		sATOMIC_AM_SeekStopLevel = sATOMIC_AM_SeekStopLevel + 10;
		if  (sATOMIC_AM_SeekStopLevel > 1200)
		{
			sATOMIC_AM_SeekStopLevel = 1200;
		}
	}
	else
	{
		if  (sATOMIC_AM_SeekStopLevel > 10)
		{
			sATOMIC_AM_SeekStopLevel = sATOMIC_AM_SeekStopLevel - 10;
		}
		if  (sATOMIC_AM_SeekStopLevel < 10)
		{
			sATOMIC_AM_SeekStopLevel = 0;
		}
	}
}

unsigned char ATOMIC_GetSignalLevel(void)
{
	if  (sATOMIC_SignalLevel < 10)
	{
		sATOMIC_SignalLevel = 0;
	}
	
	return(sATOMIC_SignalLevel / 10);
}

unsigned char ATOMIC_GetUltraSonicNoise(void)
{
	return(usATOMIC_USN / 10);
}

unsigned char ATOMIC_GetMultiPath(void)
{
	return(usATOMIC_WAM /10);
}

unsigned char ATOMIC_GetStereoBlend(void)
{
	return(usATOMIC_StereoBlend/10);
}

unsigned char ATOMIC_ReadSignalStatus(unsigned char ucBand)
{	
	signed short sSignalStatusRef;

	if  (ucBand == 0x20)
	{
		sSignalStatusRef = sATOMIC_FM_SeekStopLevel;
	}
	else
	{
		sSignalStatusRef = sATOMIC_AM_SeekStopLevel;
	}
	
	ucNXP_I2CData[0] = ucBand; ucNXP_I2CData[1] = 0x80; ucNXP_I2CData[2] = 0x01;
	NXP_I2C_SendRead(&ucNXP_I2CData[0], 3, 2);

	usATOMIC_QRS = ucNXP_I2CData[0] & 0x03;
	usATOMIC_QRS = ((usATOMIC_QRS << 8) & 0xFF00) | ucNXP_I2CData[1];

	LOG_ATOMIC("QRS:%d", usATOMIC_QRS);
	if  (usATOMIC_QRS < 320)	// 32msec
	{
		return(0);
	}

	ucNXP_I2CData[0] = ucBand; ucNXP_I2CData[1] = 0x81; ucNXP_I2CData[2] = 0x01;
	NXP_I2C_SendRead(&ucNXP_I2CData[0], 3, 10);
	
	sATOMIC_SignalLevel = ucNXP_I2CData[2];
	sATOMIC_SignalLevel = ((sATOMIC_SignalLevel << 8) & 0xFF00) | ucNXP_I2CData[3];
	
	usATOMIC_USN = ucNXP_I2CData[4];
	usATOMIC_USN = ((usATOMIC_USN << 8) & 0xFF00) | ucNXP_I2CData[5];
	
	usATOMIC_WAM = ucNXP_I2CData[6];
	usATOMIC_WAM = ((usATOMIC_WAM << 8) & 0xFF00) | ucNXP_I2CData[7];
	
	sATOMIC_FOF = ucNXP_I2CData[8];
	sATOMIC_FOF = ((sATOMIC_FOF << 8) & 0xFF00) | ucNXP_I2CData[9];
	if  (sATOMIC_FOF < 0)
	{
		sATOMIC_FOF = 0 - sATOMIC_FOF;
	}

	LOG_ATOMIC("SL:%d",sATOMIC_SignalLevel);
	LOG_ATOMIC("%ddB",sATOMIC_SignalLevel/10);
	LOG_ATOMIC("USN:%d",usATOMIC_USN);
	LOG_ATOMIC("WAM:%d",usATOMIC_WAM);
	LOG_ATOMIC("FOF:%d",sATOMIC_FOF);

	if  (ucBand == 0x20)
	{
		if  ((sATOMIC_FOF > ATOMIC_FM_FOF) || (sATOMIC_SignalLevel < sSignalStatusRef) 
			|| (usATOMIC_USN > ATOMIC_FM_USN) || (usATOMIC_WAM > ATOMIC_FM_WAM))
		{
			return(2);	// NG
		}
		else
		{
			return(1);	// OK
		}
	}
	else
	{
		if  ((sATOMIC_FOF > ATOMIC_AM_FOF) || (sATOMIC_SignalLevel < sSignalStatusRef))
		{
			return(2);
		}
		else
		{
			return(1);
		}
	}
	return(0);	// For read retry
}

void ATOMIC_SetVolumeFM(void)
{	
	ucNXP_I2CData[0] = 0x30; ucNXP_I2CData[1] = 0x0A; ucNXP_I2CData[2] = 0x01;
//	16 dB
//	ucNXP_I2CData[3] = 0x00;
//	ucNXP_I2CData[4] = 0xA1;
//	10 dB
//	ucNXP_I2CData[3] = 0x00;
//	ucNXP_I2CData[4] = 0x65;
//	11 dB
//	ucNXP_I2CData[3] = 0x00;
//	ucNXP_I2CData[4] = 0x6E;
//	8 dB
//	ucNXP_I2CData[3] = 0x00;
//	ucNXP_I2CData[4] = 0x51;
//	9 dB
//	ucNXP_I2CData[3] = 0x00;
//	ucNXP_I2CData[4] = 0x5A;
//	4 dB
//	ucNXP_I2CData[3] = 0x00;
//	ucNXP_I2CData[4] = 0x29;
//	3 dB
//	ucNXP_I2CData[3] = 0x00;
//	ucNXP_I2CData[4] = 0x1F;
//	2 dB
	ucNXP_I2CData[3] = 0x00;
	ucNXP_I2CData[4] = 0x15;
//	1 dB
//	ucNXP_I2CData[3] = 0x00;
//	ucNXP_I2CData[4] = 0x0B;
//	7 dB
//	ucNXP_I2CData[3] = 0x00;
//	ucNXP_I2CData[4] = 0x46;
	NXP_I2C_Send(&ucNXP_I2CData[0], 5);
}

void ATOMIC_SetVolumeAM(void)
{	
	ucNXP_I2CData[0] = 0x30; ucNXP_I2CData[1] = 0x0A; ucNXP_I2CData[2] = 0x01;
//	21dB
//	ucNXP_I2CData[3] = 0x00;
//	ucNXP_I2CData[4] = 0xD2;
//	20 dB
//	ucNXP_I2CData[3] = 0x00;
//	ucNXP_I2CData[4] = 0xC8;
//	16 dB
//	ucNXP_I2CData[3] = 0x00;
//	ucNXP_I2CData[4] = 0xA1;
//	15 dB
	ucNXP_I2CData[3] = 0x00;
	ucNXP_I2CData[4] = 0x96;
//	14 dB
//	ucNXP_I2CData[3] = 0x00;
//	ucNXP_I2CData[4] = 0x8D;
//	13 dB
//	ucNXP_I2CData[3] = 0x00;
//	ucNXP_I2CData[4] = 0x82;
	NXP_I2C_Send(&ucNXP_I2CData[0], 5);
}

void ATOMIC_Mute(unsigned char ucDes)
{
	ucNXP_I2CData[0] = 0x30; ucNXP_I2CData[1] = 0x0B; ucNXP_I2CData[2] = 0x01;
	ucNXP_I2CData[3] = 0x00; 
	if  (ucDes == 1)		// Mute On
	{
		ucNXP_I2CData[4] = 0x01;
	}
	else
	{
		ucNXP_I2CData[4] = 0x00;
	}
	NXP_I2C_Send(&ucNXP_I2CData[0], 5);
}

void ATOMIC_BeepInit(void)
{
//	 S C8 30 18 01 00 05 00 01 FF 38 07 D0 FF 38 03 E8 P	// Select Wave
	ucNXP_I2CData[0] = 0x30; ucNXP_I2CData[1] = 0x18; ucNXP_I2CData[2] = 0x01;
	ucNXP_I2CData[3] = 0x00; ucNXP_I2CData[4] = 0x05; ucNXP_I2CData[5] = 0x00;
	ucNXP_I2CData[6] = 0x01; ucNXP_I2CData[7] = 0xFF; ucNXP_I2CData[8] = 0x38;
	ucNXP_I2CData[9] = 0x07; ucNXP_I2CData[10] = 0xD0; ucNXP_I2CData[11] = 0xFF;
	ucNXP_I2CData[12] = 0x38; ucNXP_I2CData[13] = 0x03; ucNXP_I2CData[14] = 0xE8;
	NXP_I2C_Send(&ucNXP_I2CData[0], 15);
}

void ATOMIC_Beep(unsigned char ucDes)
{
	if  (ucDes == 1)		// On
	{
		// S C8 30 0D 01 00 80 00 F0 P 
		ucNXP_I2CData[0] = 0x30; ucNXP_I2CData[1] = 0x0D; ucNXP_I2CData[2] = 0x01;
		ucNXP_I2CData[3] = 0x00; ucNXP_I2CData[4] = 0x80; ucNXP_I2CData[5] = 0x00;
		ucNXP_I2CData[6] = 0xF0;
		NXP_I2C_Send(&ucNXP_I2CData[0], 7);
	}
	else				// Off
	{
		// S C8 30 0D 01 00 80 00 E0 P
		ucNXP_I2CData[0] = 0x30; ucNXP_I2CData[1] = 0x0D; ucNXP_I2CData[2] = 0x01;
		ucNXP_I2CData[3] = 0x00; ucNXP_I2CData[4] = 0x80; ucNXP_I2CData[5] = 0x00;
		ucNXP_I2CData[6] = 0xE0;
		NXP_I2C_Send(&ucNXP_I2CData[0], 7);
	}
}

void ATOMIC_BootOn(void)
{
	unsigned short i;
	unsigned char DataCnt;

	if  (ucATOMIC_BootSeq_Timer10msec != 0)
	{
		return;
	}
	
	switch  (ucATOMIC_BootSeq)
	{
		case ATOMIC_SEQ_START:
			ucATOMIC_BootSeq_Timer10msec = 100/10;
			ucATOMIC_BootSeq = ATOMIC_SEQ_SET_ON;
			break;
		case ATOMIC_SEQ_SET_ON:
			sATOMIC_FM_SeekStopLevel = ATOMIC_FM_LEV;
			sATOMIC_AM_SeekStopLevel = ATOMIC_AM_LEV;
			
			ucATOMIC_BootSeq_Timer10msec = 50/10;
			ucNXP_I2CData[0] = 0x1E; ucNXP_I2CData[1] = 0x5A; ucNXP_I2CData[2] = 0x01; 
			ucNXP_I2CData[3] = 0x5A; ucNXP_I2CData[4] = 0x5A;
			NXP_I2C_Send(&ucNXP_I2CData[0], 5);
			ucATOMIC_BootSeq = ATOMIC_SEQ_INIT_DATA;
			usATOMIC_DataCnt = 0;
		#ifdef  ATOMIC_EXTERN
			ucATOMIC_BootSeq = ATOMIC_SEQ_FINISH;
			PD_NXP_SCL = 0;
			PD_NXP_SDA = 0;
		#endif
			break;
		case ATOMIC_SEQ_INIT_DATA:
		//	ucATOMIC_BootSeq_Timer10msec = 20/10;
			DataCnt = ucATOMIC_InitTable[usATOMIC_DataCnt];
			++usATOMIC_DataCnt;
			for(i = 0; i < DataCnt; ++i)
			{
				ucNXP_I2CData[i] = ucATOMIC_InitTable[usATOMIC_DataCnt];
				++usATOMIC_DataCnt;
			}
			NXP_I2C_Send(&ucNXP_I2CData[0], DataCnt);
			
			if  (ucATOMIC_InitTable[usATOMIC_DataCnt] == 0xFF)
			{
				ucATOMIC_BootSeq = ATOMIC_SEQ_FINISH;
				LOG_ATOMIC("ATOMIC_BootOn:OK");
				LOG_ACC("ATOMIC:OK");
			}
			else
			{
				if  (DataCnt == 3)
				{
					if  ((ucNXP_I2CData[0] == 0x14) 
						&& (ucNXP_I2CData[1] == 0x00) && (ucNXP_I2CData[2] == 0x01))
					{
						ucATOMIC_BootSeq_Timer10msec = 100 / 10;
						ucATOMIC_BootSeq = ATOMIC_SEQ_CHECK_OPER;
					}
				}
				if  (DataCnt == 5)
				{
					if  ((ucNXP_I2CData[0] == 0x40) 
						&& (ucNXP_I2CData[1] == 0x05) && (ucNXP_I2CData[2] == 0x01)
						&& (ucNXP_I2CData[3] == 0x00) && (ucNXP_I2CData[4] == 0x01))
					{
						ucATOMIC_BootSeq_Timer10msec = 100 / 10;
						ucATOMIC_BootSeq = ATOMIC_SEQ_CHECK_OPER2;
					}
				}
			}
			break;
		case ATOMIC_SEQ_CHECK_OPER:			
//			S C8 40 80 00 RS C9 40 80 00 01 P								   // Get_Operation_Status(Chk)
			ucNXP_I2CData[0] = 0x40; ucNXP_I2CData[1] = 0x80; ucNXP_I2CData[2] = 0x01;
			NXP_I2C_SendRead(&ucNXP_I2CData[0], 3, 4);
			if  ((ucNXP_I2CData[0] == 0x00) && (ucNXP_I2CData[1] == 0x01))
			{
				ucATOMIC_BootSeq = ATOMIC_SEQ_CHECK_VERSION;
			}
			break;
		case ATOMIC_SEQ_CHECK_OPER2:
			ucNXP_I2CData[0] = 0x40; ucNXP_I2CData[1] = 0x80; ucNXP_I2CData[2] = 0x01;
			NXP_I2C_SendRead(&ucNXP_I2CData[0], 3, 4);
			if  ((ucNXP_I2CData[0] == 0x00) && (ucNXP_I2CData[1] == 0x02))
			{
				ucATOMIC_BootSeq = ATOMIC_SEQ_INIT_DATA;
			}
			break;
		case ATOMIC_SEQ_CHECK_VERSION:		// Version
			{
				ucNXP_I2CData[0] = 0x40; ucNXP_I2CData[1] = 0x82; ucNXP_I2CData[2] = 0x01;
				//RS C9 40 82 08 0D 01 00 02 00 P
				NXP_I2C_SendRead(&ucNXP_I2CData[0], 3, 8);
				ucATOMIC_BootSeq = ATOMIC_SEQ_INIT_DATA;
			}
			break;
		case ATOMIC_SEQ_FINISH:
			ucATOMIC_BootSeq_Timer10msec = 1000/10;
			ucNXP_I2CData[0] = 0x40; ucNXP_I2CData[1] = 0x80; ucNXP_I2CData[2] = 0x01;
			NXP_I2C_SendRead(&ucNXP_I2CData[0], 3, 4);
			{
				unsigned short usATOMIC_OperationStatus;

				usATOMIC_OperationStatus = ucNXP_I2CData[0];
				usATOMIC_OperationStatus = usATOMIC_OperationStatus << 8;
				usATOMIC_OperationStatus = usATOMIC_OperationStatus | ucNXP_I2CData[1];
				if  (usATOMIC_OperationStatus < 0x0002)
				{
					ucATOMIC_BootSeq = ATOMIC_SEQ_START;
					ucATOMIC_BootSeq_Timer10msec = 100/10;
					if  (FUNC_PowerStatus() == 1)
					{
						FUNC_AbnormalRecovery();
					}
				}
			}
			break;
	}
}


#endif

